const ajax= param => {
	const header = {}
	if (!(param.url.includes('/doLogin') || param.url.includes('/regiest') || param.url.includes('/getSmsCode'))){
		header['Authorization'] = plus.storage.getItem('token')||''
	}
     
  return new Promise((resovle, reject) => {
	$.ajax({
	  type:param.type || "get",
	  async:param.async || true,
	  headers : header,
	  url: `http://192.168.1.28:8080${param.url}`,
	  data:param.data || "",
	  processData: param.processData || true,
	  success: res => {
	  	if(res.code === 200){
	  		resovle(res);
	  	}else {
	  		plus.nativeUI.toast('服务器出现了点问题...')
	  		reject(new Error('error'));
	  	}
	  },
	  error: err => {
		reject(err);
	  }
	})
  })
}